<%@ page contentType="text/html;charset=UTF-8"%>
<%
	String ctxPath = (String)request.getContextPath();
	request.setAttribute("ctx", ctxPath);
%>
<!DOCTYPE html>
<html>
<head>
<title>Signup</title>
<!-- Custom Theme files -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Govihar Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template, 
	Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- //Custom Theme files -->
<link href="${ctx}/static/css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="${ctx}/static/css/style.css" type="text/css" rel="stylesheet" media="all">
<link rel="stylesheet" href="${ctx}/static/css/flexslider.css" type="text/css" media="screen" />
<link type="text/css" rel="stylesheet" href="${ctx}/static/css/JFFormStyle-1.css" />
<!-- js -->
<script src="${ctx}/static/js/jquery.min.js"></script>
<script src="${ctx}/static/js/modernizr.custom.js"></script>
<script src="${ctx}/static/js/jquery.js"></script>
<script src="${ctx}/static/js/jquery.validate.min.js"></script>
<script src="${ctx}/static/js/messages_zh.js"></script>
<!-- //js -->
<!-- fonts -->
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,700,500italic,700italic,900,900italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'>
<!-- //fonts -->	
<script type="text/javascript">
		$(document).ready(function () {
			$('#horizontalTab').easyResponsiveTabs({
				type: 'default', //Types: default, vertical, accordion           
				width: 'auto', //auto or any width like 600px
				fit: true   // 100% fit in a container
			});
		});

        $.validator.setDefaults({
              submitHandler: function() {
              alert("提交事件!");
             }
        });
        $().ready(function() {
             $("#registform").validate();
        });
</script>
<style>
.error{
	color:red;
}
</style>
<!--pop-up-->
<script src="${ctx}/static/js/menu_jquery.js"></script>
<!--//pop-up-->	
</head>
<body>
	<!--header-->
	<div class="header">
		<div class="container">
			<div class="header-grids">
				<div class="logo">
					<h1><a  href="index.html"><span>Qu</span>nar</a></h1>
				</div>
				<!--navbar-header-->
				<div class="header-dropdown">
					<div class="emergency-grid">
						<ul>
							<li>Toll Free : </li>
							<li class="call">+1 234 567 8901</li>
						</ul>
					</div>
					<div class="clearfix"> </div>
				</div>
				<div class="clearfix"> </div>
			</div>
			<div class="nav-top">
				<div class="top-nav">
					<span class="menu"><img src="${ctx}/static/images/menu.png" alt="" /></span>
					<ul class="nav1">
						<li class="active"><a href="index.html">首页</a></li>
						<li><a href="index.html">机票</a></li>
						<li><a href="hotels.html">酒店</a></li>
						<li><a href="holidays.html">度假</a></li>
						<li><a href="flights-hotels.html">门票</a></li>
						<!--  <li><a href="bus.html">Bus</a></li>  -->
						<li><a href="trains.html">火车票</a></li>
						
						<li><a href="deals.html">推荐</a></li>
					</ul>
					<div class="clearfix"> </div>
					<!-- script-for-menu -->
							 <script> 
							   $( "span.menu" ).click(function() {
								 $( "ul.nav1" ).slideToggle( 300, function() {
								 // Animation complete.
								  });
								 });
							
							</script>
							<!-- script-for-menu -->
							 <script> 
							   $( "span.menu" ).click(function() {
								 $( "ul.nav1" ).slideToggle( 300, function() {
								 // Animation complete.
								  });
								 });
							
							</script>
						<!-- /script-for-menu -->
				</div>
				<div class="dropdown-grids">
						<div id="loginContainer"><a href="#" id="loginButton"><span>登录</span></a>
							<div id="loginBox">                
								<form id="loginForm" action="login">
									<div class="login-grids">
										<div class="login-grid-left">
											<fieldset id="body">
												<fieldset>
													<label for="username">用户名</label>
													<input type="text" name="username" id="username">
												</fieldset>
												<fieldset>
													<label for="password">密码</label>
													<input type="password" name="password" id="password">
												</fieldset>
												<input type="submit" id="login" value="登 录">
												<label for="checkbox"><input type="checkbox" id="checkbox"> <i>记住密码</i></label>
											</fieldset>
											<span><a href="#">忘记密码?</a></span>
										
										</div>
									</div>
								</form>
							</div>
						</div>
				<div class="clearfix"> </div>
			</div>
		</div>
	</div>
	<!--//header-->
	<!-- banner-bottom -->
	<div class="banner-bottom">
		<!-- container -->
		<div class="container">
			<div class="faqs-top-grids">
				<div class="book-grids">
					<div class="col-md-6 book-left">
						<div class="book-left-info">
							<h3>用户注册</h3>
						</div>
						<div class="book-left-form" id="userCue">
							<form id="registform" action="regist" method="post">
								<p>用户名</p>
								<input type="text" name="username" id="username" required>
								<p>密码</p>
								<input type="password" name="password" id="password" required>
								<p>确认密码</p>
								<input type="password" name="password1" id="password1" required>
								<p>手机号</p>
								<input type="text" name="phoneno" id="phoneno" required>
								<label for="checkbox"><input type="checkbox" id="checkbox"> <i>记住密码</i></label>
								<p><input type="button" id="reaaaa" value="注册" style="background-color:#6fd508; color:white; padding: 12px 26px"></p>
							</form>
							<div id="registSuccess">
								<h1 style='color:green'> 注册成功！！</h1>
			                    <p></p>
			                    <p></p>
							    <a href="index" style='color:#e1aef5'>返回首页</a>
							</div>
						</div>
					</div>
					<div class="col-md-6 book-left book-right">
						<div class="book-left-info">
							<h3>其他方式</h3>
						</div>
						<div class="book-left-bottom">
							<div class="book-left-facebook">
								<a href="#">Connect with Facebook</a>
							</div>
							<div class="book-left-chrome">
								<a href="#">Connect with Google</a>
							</div>
						</div>
						<ul>
							<li>Access booking history with upcoming trips</li>
							<li>Print tickets and invoices</li>
							<li>Make checkouts simpler</li>
							<li>Enter your contact details only once</li>
							<li>Get alerts for low fares</li>
						</ul>
					</div>
					<div class="clearfix"> </div>
				</div>
			</div>
		</div>
		<!-- //container -->
	</div>
	<!-- //banner-bottom -->
	<!-- footer -->
	<div class="footer">
		<!-- container -->
		<div class="container">
			<div class="footer-top-grids">
				<div class="footer-grids">
					<div class="col-md-3 footer-grid">
						<h4>Our Products</h4>
						<ul>
							<li><a href="index.html">Flight Schedule</a></li>
							<li><a href="flights-hotels.html">City Airline Routes</a></li>
							<li><a href="index.html">International Flights</a></li>
							<li><a href="hotels.html">International Hotels</a></li>
							<li><a href="bus.html">Bus Booking</a></li>
							<li><a href="index.html">Domestic Airlines</a></li>
							<li><a href="holidays.html">Holidays Trip</a></li>
							<li><a href="hotels.html">Hotel Booking</a></li>
						</ul>
					</div>
					<div class="col-md-3 footer-grid">
						<h4>Company</h4>
						<ul>
							<li><a href="about.html">About Us</a></li>
							<li><a href="faqs.html">FAQs</a></li>
							<li><a href="terms.html">Terms &amp; Conditions</a></li>
							<li><a href="privacy.html">Privacy </a></li>
							<li><a href="contact.html">Contact Us</a></li>
							<li><a href="#">Careers</a></li>
							<li><a href="blog.html">Blog</a></li>
							<li><a href="booking.html">Feedback</a></li>
						</ul>
					</div>
					<div class="col-md-3 footer-grid">
						<h4>Travel Resources</h4>
						<ul>
							<li><a href="holidays.html">Holidays Packages</a></li>
							<li><a href="weekend.html">Weekend Getaways</a></li>
							<li><a href="index.html">International Airports</a></li>
							<li><a href="index.html">Domestic Flights Booking</a></li>
							<li><a href="booking.html">Customer Support</a></li>
							<li><a href="booking.html">Cancel Bookings</a></li>
							<li><a href="booking.html">Print E-tickets</a></li>
							<li><a href="booking.html">Customer Forums</a></li>
							<li><a href="booking.html">Make a Payment</a></li>
							<li><a href="booking.html">Complete Booking</a></li>
							<li><a href="booking.html">Assurance Claim</a></li>
							<li><a href="booking.html">Retail Offices</a></li>
						</ul>
					</div>
					<div class="col-md-3 footer-grid">
						<h4>More Links</h4>
						<ul class="chf_footer_list">
							<li><a href="#">Flights Discount Coupons</a></li>
							<li><a href="#">Domestic Airlines</a></li>
							<li><a href="#">Indigo Airlines</a></li>
							<li><a href="#">Air Asia</a></li>
							<li><a href="#">Jet Airways</a></li>
							<li><a href="#">SpiceJet</a></li>
							<li><a href="#">GoAir</a></li>
							<li><a href="#">Air India</a></li>
							<li><a href="#">Domestic Flight Routes</a></li>
							<li><a href="#">Indian City Flight</a></li>
							<li><a href="#">Flight Sitemap</a></li>
						</ul>
					</div>
					<div class="clearfix"> </div>
				</div>
				<!-- news-letter -->
				<div class="news-letter">
					<div class="news-letter-grids">
						<div class="col-md-4 news-letter-grid">
							<p>Toll Free No : <span>1234-5678-901</span></p>
						</div>
						<div class="col-md-4 news-letter-grid">
							<p class="mail">Email : <a href="mailto:info@example.com">mail@example.com</a></p>
						</div>
						<div class="col-md-4 news-letter-grid">
							<form>
								<input type="text" value="Email" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Email';}" required="">
								<input type="submit" value="Subscribe">
							</form>
						</div>
						<div class="clearfix"> </div>
					</div>
				</div>
				<!-- //news-letter -->
			</div>
		</div>
		<!-- //container -->
	</div>
	<!-- //footer -->
	<div class="footer-bottom-grids">
		<!-- container -->
		<div class="container">
				<div class="footer-bottom-top-grids">
					<div class="col-md-4 footer-bottom-left">
						<h4>Download our mobile Apps</h4>
						<div class="d-apps">
							<ul>
								<li><a href="#"><img src="${ctx}/static/images/app1.png" alt="" /></a></li>
								<li><a href="#"><img src="${ctx}/static/images/app2.png" alt="" /></a></li>
								<li><a href="#"><img src="${ctx}/static/images/app3.png" alt="" /></a></li>
							</ul>
						</div>
					</div>
					<div class="col-md-4 footer-bottom-left">
						<h4>We Accept</h4>
						<div class="a-cards">
							<ul>
								<li><a href="#"><img src="${ctx}/static/images/c1.png" alt="" /></a></li>
								<li><a href="#"><img src="${ctx}/static/images/c2.png" alt="" /></a></li>
								<li><a href="#"><img src="${ctx}/static/images/c3.png" alt="" /></a></li>
							</ul>
						</div>
					</div>
					<div class="col-md-4 footer-bottom-left">
						<h4>Follow Us</h4>
						<div class="social">
							<ul>
								<li><a href="#" class="facebook"> </a></li>
								<li><a href="#" class="facebook twitter"> </a></li>
								<li><a href="#" class="facebook chrome"> </a></li>
								<li><a href="#" class="facebook dribbble"> </a></li>
							</ul>
						</div>
					</div>
					<div class="clearfix"> </div>
					<div class="copyright">
						<p>Copyright &copy; 2018.Company name All rights reserved.<a target="_blank" href="http://www.cssmoban.com/">&#x7F51;&#x9875;&#x6A21;&#x677F;</a></p>
					</div>
				</div>
		</div>
	</div>
	<script defer src="${ctx}/static/js/jquery.flexslider.js"></script>
	<script src="${ctx}/static/js/easyResponsiveTabs.js" type="text/javascript"></script>
	<script src="${ctx}/static/js/jquery-ui.js"></script>
	<script type="text/javascript" src="${ctx}/static/js/script.js"></script>	
</body>

<script type="text/javascript">
$(function(){
	$("#registSuccess").hide();
	
	
    //按钮单击时执行
    $("#reaaaa").click(function(){
   		$.ajax({  
            type:'post',  
            url:'/user/regist',  
            data:$("#registform").serialize(),  
            cache:false,  
            dataType:'text',  
            success:function(){  
            	  //提示注册成功
           	  //alert("注册成功");
           	
           	  //window.location.href="/user/index";//需要跳转的地址
            	  $("#registform").hide();
            	  $("#registSuccess").show();
            	    
            },
            error:function(data) {
              	alert(data.errorMsg);
            }
        });  
       
     });
});
</script>
</html>